package ink.onei.shopping.domain;

import java.math.BigDecimal;
import java.util.Date;


import com.fasterxml.jackson.annotation.JsonFormat;
import ink.onei.system.domain.Address;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import ink.onei.common.annotation.Excel;
import ink.onei.common.core.domain.BaseEntity;
import org.apache.ibatis.type.Alias;

/**
 * 订单对象 order
 * 
 * @author nekotako
 * @date 2024-02-24
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Alias("Order")
public class Order extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long orderId;

    /** 客户编号 */
    @Excel(name = "客户编号")
    private Long clientId;

    /** 商品规格编号 */
    @Excel(name = "商品规格编号")
    private Long detailId;

    /** 商品名称 */
    @Excel(name = "商品名称")
    private String detailName;
    /** 商品数量 */
    @Excel(name = "商品数量")
    private Long detailNum;

    /** 地址编号 */
    @Excel(name = "地址编号")
    private Long addrId;

    /** 创建时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:MM:ss")
    @Excel(name = "创建时间", width = 30, dateFormat = "yyyy-MM-dd HH:MM:ss")
    private Date createDate;

    /** 订单状态 */
    @Excel(name = "订单状态")
    private Long status;

    /** 订单评价 */
    @Excel(name = "订单评价")
    private String comment;

    /** 删除标记 */
    private Long delFlag;

    /** 订单编号 */
    @Excel(name = "订单编号")
    private String traceNo;

    /** 支付总金额 */
    @Excel(name = "支付总金额")
    private Double totalAmount;

    /** $column.columnComment */
    @Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
    private String alipayTraceNo;

    // 地址信息
    private Address address;
}
